<template>
	<view class="">
		首页
	</view>
	<view class="top-center">
		<button class="mini-btn" type="warn" size="mini" @tap="gotoDeepseek">和 DeepSeek 对话</button>
	</view>

	<view class="top-center">
		<button class="mini-btn" type="warn" size="mini" @tap="showMsg">显示提示消息</button>
	</view>

	<view class="">
		<button class="mini-btn" type="warn" size="mini" @tap="showLoading">显示数据加载</button>
	</view>

	<view class="">
		<button class="mini-btn" type="warn" size="mini" @tap="delSubmit">删除</button>
	</view>

</template>


<style>
	.top-center {
		display: flex;
		justify-content: center;
		/* 水平居中 */
		align-items: flex-start;
		/* 顶部对齐 */
		padding-top: 40rpx;
		/* 顶部间距，可调整 */
	}
</style>


<script>
	export default {
		data() {
			return {}
		},
		onLoad() {

		},
		methods: {
			gotoDeepseek() {
				uni.navigateTo({
					url: '/pages/chat/chat'
				})
			},
			showMsg() {
				uni.showToast({
					title: '请输入你的问题',
					duration: 2000
				})
			},
			showLoading() {
				uni.showLoading({
					title: '加载......',
					mask: true
				})
			},
			delSubmit() {
				uni.showModal({
					title: '确认',
					content: '是否确定删除？',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				})
			}

		}
	}
</script>